package com.sms.database;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

class DatabaseHelper extends SQLiteOpenHelper 
{
	private final static String dbname = "SMS";
	private final static String tablename = "history";
	
	private final static int version = 2;
	private final static String id = "_id";
	private SQLiteDatabase SQLite;
	private Context ctx;
	private DatabaseHelper helper;
	
	private static String createDatabase = "create table history(_id integer primary key Autoincrement, phonenumber text not null,message text not null)";
	
	
	
    public DatabaseHelper(Context context) 
    { 
    	super(context, dbname, null, version); 
    	
    }

   

	



	@Override
    public void onCreate(SQLiteDatabase db) { db.execSQL(createDatabase); }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { onCreate(db); }
}